package com.ruoyi.tea.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tea.mapper.TeaRecoringSeeCountMapper;
import com.ruoyi.tea.domain.TeaRecoringSeeCount;
import com.ruoyi.tea.service.ITeaRecoringSeeCountService;
import com.ruoyi.common.core.text.Convert;

/**
 * 用户观看统计Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-08-09
 */
@Service
public class TeaRecoringSeeCountServiceImpl implements ITeaRecoringSeeCountService 
{
    @Autowired
    private TeaRecoringSeeCountMapper teaRecoringSeeCountMapper;

    /**
     * 查询用户观看统计
     * 
     * @param id 用户观看统计主键
     * @return 用户观看统计
     */
    @Override
    public TeaRecoringSeeCount selectTeaRecoringSeeCountById(Long id)
    {
        return teaRecoringSeeCountMapper.selectTeaRecoringSeeCountById(id);
    }

    /**
     * 查询用户观看统计列表
     * 
     * @param teaRecoringSeeCount 用户观看统计
     * @return 用户观看统计
     */
    @Override
    public List<TeaRecoringSeeCount> selectTeaRecoringSeeCountList(TeaRecoringSeeCount teaRecoringSeeCount)
    {
        return teaRecoringSeeCountMapper.selectTeaRecoringSeeCountList(teaRecoringSeeCount);
    }

    /**
     * 新增用户观看统计
     * 
     * @param teaRecoringSeeCount 用户观看统计
     * @return 结果
     */
    @Override
    public int insertTeaRecoringSeeCount(TeaRecoringSeeCount teaRecoringSeeCount)
    {
        teaRecoringSeeCount.setCreateTime(DateUtils.getNowDate());
        return teaRecoringSeeCountMapper.insertTeaRecoringSeeCount(teaRecoringSeeCount);
    }

    /**
     * 修改用户观看统计
     * 
     * @param teaRecoringSeeCount 用户观看统计
     * @return 结果
     */
    @Override
    public int updateTeaRecoringSeeCount(TeaRecoringSeeCount teaRecoringSeeCount)
    {
        return teaRecoringSeeCountMapper.updateTeaRecoringSeeCount(teaRecoringSeeCount);
    }

    /**
     * 批量删除用户观看统计
     * 
     * @param ids 需要删除的用户观看统计主键
     * @return 结果
     */
    @Override
    public int deleteTeaRecoringSeeCountByIds(String ids)
    {
        return teaRecoringSeeCountMapper.deleteTeaRecoringSeeCountByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除用户观看统计信息
     * 
     * @param id 用户观看统计主键
     * @return 结果
     */
    @Override
    public int deleteTeaRecoringSeeCountById(Long id)
    {
        return teaRecoringSeeCountMapper.deleteTeaRecoringSeeCountById(id);
    }
}
